home *** CD-ROM | disk | FTP | other *** search
/ Aminet 32 / Aminet 32 (1999)(Schatztruhe)[!][Aug 1999].iso / Aminet / biz / haage / WarpUP_V40Upd.lha / WarpUP-WarpOS / include / clib / powerpc_protos.h
C/C++ Source or Header  |  1999-04-11  |  6KB  |  221 lines

  1. #ifndef CLIB_POWERPC_PROTOS_H
  2. #define CLIB_POWERPC_PROTOS_H
  3.  
  4. #ifndef UTILITY_TAGITEM_H
  5. #include <utility/tagitem.h>
  6. #endif
  7.  
  8. #ifndef DEVICES_TIMER_H
  9. #include <devices/timer.h>
  10. #endif
  11.  
  12. #ifndef POWERPC_PORTSPPC_H
  13. #include <powerpc/portsPPC.h>
  14. #endif
  15.  
  16. #ifndef POWERPC_TASKS_H
  17. #include <powerpc/tasksppc.h>
  18. #endif
  19.  
  20. #ifndef POWERPC_SEMAPHORES_H
  21. #include <powerpc/semaphoresppc.h>
  22. #endif
  23.  
  24. #ifndef __PPC__
  25.  
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29.  
  30. /* *** ppc call */
  31. ULONG RunPPC(struct PPCArgs *);
  32. ULONG WaitForPPC(struct PPCArgs *);
  33. struct TaskPPC *CreatePPCTask(struct TagItem *);
  34. struct TaskPPC *CreatePPCTaskTags(Tag tag1, ...);
  35.  
  36. /* *** hardware */
  37. ULONG GetCPU(VOID);
  38. void SetCache68K(ULONG,void *,ULONG);
  39. void CausePPCInterrupt(VOID);
  40.  
  41. /* *** debugging */
  42. VOID PowerDebugMode(ULONG);
  43. VOID SPrintF68K(STRPTR,APTR);
  44.  
  45. /* *** memory */
  46. APTR AllocVec32(ULONG,ULONG);
  47. VOID FreeVec32(APTR);
  48.  
  49. /* *** general information */
  50. ULONG GetPPCState(VOID);
  51.  
  52. #ifndef POWERPCLIB_V7
  53.  
  54. /* *** ports */
  55. struct Message *AllocXMsg(ULONG,struct MsgPort *);
  56. VOID FreeXMsg(struct Message *);
  57. VOID PutXMsg(struct MsgPortPPC, struct Message *);
  58.  
  59. #endif /* POWERPCLIB_V7 */
  60.  
  61. #ifdef __cplusplus
  62. };
  63. #endif
  64.  
  65. #ifdef STORMPRAGMAS
  66. #ifndef _INCLUDE_PRAGMA_POWERPC_LIB_H
  67. #include <pragma/powerpc_lib.h>
  68. #endif
  69. #endif
  70.  
  71. #else /* __PPC__ */
  72.  
  73. #ifdef __STORM__               /* other syntax for StormC */
  74.  
  75. #ifndef STORMPROTOS_POWERPC_SPROTOS_H
  76. #include <stormprotos/powerpc_sprotos.h>
  77. #endif
  78.  
  79. #else   /* __STORM__ */
  80.  
  81. #ifdef __cplusplus
  82. extern "C" {
  83. #endif
  84.  
  85. ULONG Run68K(struct PPCArgs *);
  86. ULONG WaitFor68K(struct PPCArgs *);
  87.  
  88. /* *** debugging */
  89. VOID SPrintF(STRPTR, APTR);
  90.  
  91. /* *** memory */
  92. APTR AllocVecPPC(ULONG, ULONG, ULONG);
  93. LONG FreeVecPPC(APTR);
  94.  
  95. /* *** time measurement */
  96. VOID GetSysTimePPC(struct timeval *);
  97. VOID AddTimePPC(struct timeval *, struct timeval *);
  98. VOID SubTimePPC(struct timeval *, struct timeval *);
  99. LONG CmpTimePPC(struct timeval *, struct timeval *);
  100.  
  101. #ifndef POWERPCLIB_V7
  102. /* *** more debugging */
  103. ULONG SnoopTask(struct TagItem *);
  104. ULONG SnoopTaskTags(Tag tag1, ...);
  105. VOID EndSnoopTask(ULONG);
  106.  
  107. /* *** more memory */
  108. VOID FreeAllMem();
  109. VOID CopyMemPPC(APTR, APTR, ULONG);
  110. VOID* CreatePoolPPC(ULONG, ULONG, ULONG);
  111. VOID DeletePoolPPC(VOID*);
  112. VOID* AllocPooledPPC(VOID*, ULONG);
  113. VOID FreePooledPPC(VOID*, VOID*, ULONG);
  114.  
  115. /* *** lists */
  116. VOID AddHeadPPC(struct List *, struct Node *);
  117. VOID AddTailPPC(struct List *, struct Node *);
  118. VOID EnqueuePPC(struct List *, struct Node *);
  119. struct Node *FindNamePPC(struct List *, STRPTR);
  120. VOID InsertPPC(struct List *, struct Node *, struct Node *);
  121. struct Node *RemHeadPPC(struct List *);
  122. VOID RemovePPC(struct Node *);
  123. struct Node *RemTailPPC(struct Node *);
  124. VOID NewListPPC(struct List*);
  125.  
  126. /* *** semaphores */
  127. VOID AddSemaphorePPC(struct SignalSemaphorePPC *);
  128. LONG AttemptSemaphorePPC(struct SignalSemaphorePPC *);
  129. struct SignalSemaphorePPC *FindSemaphorePPC(STRPTR);
  130. VOID FreeSemaphorePPC(struct SignalSemaphorePPC *);
  131. LONG InitSemaphorePPC(struct SignalSemaphorePPC *);
  132. VOID ObtainSemaphorePPC(struct SignalSemaphorePPC *);
  133. VOID ReleaseSemaphorePPC(struct SignalSemaphorePPC *);
  134. VOID RemSemaphorePPC(struct SignalSemaphorePPC *);
  135. LONG TrySemaphorePPC(struct SignalSemaphorePPC *, ULONG);
  136. VOID ObtainSemaphoreSharedPPC(struct SignalSemaphorePPC *);
  137. LONG AttemptSemaphoreSharedPPC(struct SignalSemaphorePPC *);
  138. VOID ProcurePPC(struct SignalSemaphorePPC *, struct SemaphoreMessage *);
  139. VOID VacatePPC(struct SignalSemaphorePPC *, struct SemaphoreMessage *);
  140.  
  141. /* *** signals */
  142. LONG AllocSignalPPC(LONG);
  143. VOID FreeSignalPPC(LONG);
  144. ULONG SetSignalPPC(ULONG, ULONG);
  145. VOID SignalPPC(struct TaskPPC *, ULONG);
  146. ULONG WaitPPC(ULONG);
  147. ULONG WaitTime(ULONG, ULONG);
  148. ULONG SetExceptPPC(ULONG, ULONG, ULONG);
  149.  
  150. /* *** tasks */
  151. struct TaskPPC *CreateTaskPPC(struct TagItem *);
  152. struct TaskPPC *CreateTaskPPCTags(Tag tag1, ...);
  153. VOID DeleteTaskPPC(struct TaskPPC *);
  154. struct TaskPPC *FindTaskPPC(STRPTR);
  155. struct TaskPtr *LockTaskList();
  156. LONG SetTaskPriPPC(struct TaskPPC *, LONG);
  157. VOID UnLockTaskList();
  158. struct TaskPPC *FindTaskByID(LONG);
  159. LONG SetNiceValue(struct TaskPPC *, LONG);
  160.  
  161. /* *** ports */
  162. VOID AddPortPPC(struct MsgPortPPC *);
  163. struct MsgPortPPC *CreateMsgPortPPC();
  164. VOID DeleteMsgPortPPC(struct MsgPortPPC *);
  165. struct MsgPortPPC *FindPortPPC(STRPTR);
  166. struct Message *GetMsgPPC(struct MsgPortPPC *);
  167. VOID PutMsgPPC(struct MsgPortPPC *, struct Message *);
  168. struct Message *WaitPortPPC(struct MsgPortPPC *);
  169. VOID RemPortPPC(struct MsgPortPPC *);
  170. VOID ReplyMsgPPC(struct Message *);
  171. struct Message *AllocXMsgPPC(ULONG, struct MsgPortPPC *);
  172. VOID FreeXMsgPPC(struct Message *);
  173. VOID PutXMsgPPC(struct MsgPort *, struct Message *);
  174. struct MsgPortPPC *SetReplyPortPPC(struct Message *, struct MsgPortPPC *);
  175.  
  176. /* *** tag items */
  177. struct TagItem *FindTagItemPPC(ULONG, struct TagItem *);
  178. ULONG GetTagDataPPC(ULONG, ULONG, struct TagItem *);
  179. struct TagItem *NextTagItemPPC(struct TagItem **);
  180.  
  181. /* *** hardware */
  182. VOID ChangeMMU(ULONG);
  183. VOID GetInfo(struct TagItem *);
  184. VOID SetCache(ULONG, APTR, ULONG);
  185. ULONG SetHardware(ULONG, APTR);
  186. VOID GetHALInfo(struct TagItem *);
  187. VOID SetScheduling(struct TagItem *);
  188.  
  189. /* *** exceptions */
  190. VOID ModifyFPExc(ULONG);
  191. VOID RemExcHandler(APTR);
  192. APTR SetExcHandler(struct TagItem *);
  193. APTR SetExcHandlerTags(Tag tag1, ...);
  194. VOID SetExcMMU();
  195. VOID ClearExcMMU();
  196. VOID CauseInterrupt();
  197.  
  198. /* *** supervisor */
  199. ULONG Super();
  200. VOID User(ULONG);
  201.  
  202. /* *** 68K connection */
  203. VOID Signal68K(struct Task *, ULONG);
  204.  
  205. /* *** formatting */
  206. APTR RawDoFmtPPC(STRPTR, APTR, void (*)(), APTR);
  207.  
  208. #endif /* POWERPCLIB_V7 */
  209.  
  210. #ifdef __cplusplus
  211. };
  212. #endif
  213.  
  214.  
  215. #endif /* __STORM__ */
  216.  
  217. #endif /* __PPC__ */
  218.  
  219.  
  220. #endif /* CLIB_POWERPC_PROTOS_H */
  221.